package edu.sctu.liangyuxiang.day20150526;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * Created by user20 on 2015/5/26.
 */
public class AddList {
    public List <String> setAddList(){
        List<String> list = new ArrayList<String>();
        list.add("张三");
        list.add("李四");
        list.add(0,"王二");

        return list;
    }

    public List<String> setList(){
        List<String> list = setAddList();
        for (int i = 0; i <list.size() ; i++) {
            System.out.println(list.get(i));
        }
        return list;
    }

    public List<HashMap<String, List<SetStudent>>> hashmapList(){
        List<HashMap<String, List<SetStudent>>> list = new ArrayList<HashMap<String, List<SetStudent>>>();
        HashMap<String, List<SetStudent>> hashmap = new HashMap<String, List<SetStudent>>();
        List<SetStudent> list2 = new ArrayList<SetStudent>();
        SetStudent setstudent = new SetStudent();

        setstudent.name = "张三";
        list2.add(setstudent);
        hashmap.put("1", list2);
        list.add(hashmap);

        return list;
    }
}
